<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Schema;

class Ad extends Model
{
    //
    protected $table = 'ad';

    public function getFillable()
    {
        // 原来直接返回每个模型单独设置的过滤字段
        //return $this->fillable;

        // 直接返回表的所有的字段信息
        $table   = $this->getTable();
        $columns = Schema::getColumnListing($table);
        unset($columns['id']);

        return $columns;
    }
}
